<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<link href="/element/css/index.css" rel="stylesheet"/>
<script src="/element/js/vue.js"></script>
<script src="/element/js/index.js"></script>
<script src="/element/js/axios.js"></script>
<script src="/element/js/app.js"></script>
<body>
<div id="app">
    <el-card class="box-card">
        <div slot="header" class="clearfix">
            <span>可新建流程列表</span>
            <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>
        </div>
        <div v-for="item in processList"  class="text item">
            <a @click="openFlow(item)">{{'列表内容 ' + item.name }}</a>
        </div>
    </el-card>

</div>
<script>

    var Main = {
        components: {},
        props: [],
        data() {
            return {
                processList:[]
            }
        },
        computed: {},
        watch: {},
        created() {
            this.getstartProcess();
        },

        mounted() {},
        methods: {
            getstartProcess(){
              api.POST('/flow/getstartprocess',{},(res)=>{
                  this.processList=res.data;
              })
            },
            openFlow(data) {
                window.open("/flowprocess/index?processId="+data.id,"_blank");
            },
            submitForm() {
                this.$refs['elForm'].validate(valid => {
                    if (!valid) return
                    // TODO 提交表单
                })
            },
            resetForm() {
                this.$refs['elForm'].resetFields()
            },
        }
    }
    var Ctor = Vue.extend(Main)
    new Ctor().$mount('#app')

</script>

</body>
</html>